The useInventory hook retrieves the user inventory in a collection from your Marketplace.
import { useInventory } from "@0xsequence/marketplace-sdk/react";
## Into your React component:
const { data: inventoryData } = useInventory({
accountAddress: "0x2b54eAE39bdcDbBE1bbe001a4329C38cD58679D1",
chainId: 421614,
collectionAddress: "0x36631c1e690714192614364ae9629850b546d194"
});
console.log(inventoryData);
Show child attributes
interface UseInventoryArgs {
accountAddress: Address;
collectionAddress: Address;
chainId: number;
isLaos721?: boolean;
query?: {
enabled?: boolean;
};
}
Was this page helpful?